package com.yz.group1.group_1.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yz.group1.group_1.entity.AppointmentTime;
import com.yz.group1.group_1.mapper.AppointmentTimeMapper;
import com.yz.group1.group_1.service.AppointmentTimeService;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class AppointmentTimeServiceImpl extends ServiceImpl<AppointmentTimeMapper, AppointmentTime> implements AppointmentTimeService {

    @Override
    public List<AppointmentTime> getByDoctorId(Integer doctorId) {
        QueryWrapper<AppointmentTime> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("doctor_id", doctorId).eq("status", 1);
        return baseMapper.selectList(queryWrapper);
    }
}